//
//  LTFCollectionViewCell.m
//  NeteaseNews
//
//  Created by liutaifeng on 16/4/16.
//  Copyright © 2016年 liutaifeng. All rights reserved.
//

#import "LTFCollectionViewCell.h"
#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height
@implementation LTFCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self createView];
    }
    return self;
}
- (void)createView {
    //图片
    self.picImageView = [[UIImageView alloc] init];
    [self.contentView addSubview:_picImageView];
    //_picImageView.backgroundColor = [UIColor redColor];
    [_picImageView release];
    
    //标题
    self.titleLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_titleLabel];
   // _titleLabel.backgroundColor = [UIColor blueColor];
    _titleLabel.textColor = [UIColor whiteColor];
    [_titleLabel release];
    
    //提示图
    self.picture = [[UIImageView alloc] init];
    [self.contentView addSubview:_picture];
    _picture.image = [UIImage imageNamed:@"tupian.png"];
    [_picture release];
    
    
}

- (void)layoutSubviews {
    [super layoutSubviews];
    self.picImageView.frame = self.contentView.frame;
    self.picture.frame = CGRectMake(10, HEIGHT / 6 * 5, 20, 20);
    self.titleLabel.frame = CGRectMake(35, HEIGHT / 6 * 5, WIDTH / 3 * 2, 20);
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
